package com.ruoyi.train.service.impl;

import com.ruoyi.train.domain.JyTrainingSchoolCourseMaterial;
import com.ruoyi.train.mapper.JyTrainingSchoolCourseMaterialMapper;
import com.ruoyi.train.service.IJyTrainingSchoolCourseMaterialService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训课程物资Service业务层处理
 *
 * @author aulbrother
 * @date 2024-04-06
 */
@Service
@RequiredArgsConstructor
public class JyTrainingSchoolCourseMaterialServiceImpl implements IJyTrainingSchoolCourseMaterialService {
    private final JyTrainingSchoolCourseMaterialMapper jyTrainingSchoolCourseMaterialMapper;

    /**
     * 查询培训课程物资
     *
     * @param id 培训课程物资主键
     * @return 培训课程物资
     */
    @Override
    public JyTrainingSchoolCourseMaterial selectJyTrainingSchoolCourseMaterialById(Long id) {
        return jyTrainingSchoolCourseMaterialMapper.selectJyTrainingSchoolCourseMaterialById(id);
    }

    /**
     * 查询培训课程物资列表
     *
     * @param jyTrainingSchoolCourseMaterial 培训课程物资
     * @return 培训课程物资
     */
    @Override
    public List<JyTrainingSchoolCourseMaterial> selectJyTrainingSchoolCourseMaterialList(JyTrainingSchoolCourseMaterial jyTrainingSchoolCourseMaterial) {
        return jyTrainingSchoolCourseMaterialMapper.selectJyTrainingSchoolCourseMaterialList(jyTrainingSchoolCourseMaterial);
    }

    /**
     * 修改培训课程物资
     *
     * @param jyTrainingSchoolCourseMaterial 培训课程物资
     * @return 结果
     */
    @Override
    public int updateJyTrainingSchoolCourseMaterial(JyTrainingSchoolCourseMaterial jyTrainingSchoolCourseMaterial) {
        return jyTrainingSchoolCourseMaterialMapper.updateJyTrainingSchoolCourseMaterial(jyTrainingSchoolCourseMaterial);
    }

    @Override
    public List<JyTrainingSchoolCourseMaterial> selectJyTrainingSchoolCourseMaterialByCourseId(Long courseId){
        return jyTrainingSchoolCourseMaterialMapper.selectJyTrainingSchoolCourseMaterialByCourseId(courseId);
    }
}
